package cn.edu.example.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.example.dao.StudentDao;
import cn.edu.example.dao.UserDao;
import cn.edu.example.po.Place;
import cn.edu.example.po.Student;
import cn.edu.example.service.StudentService;

@Service("studentService")
@Transactional
public class StudentServiceImpl implements StudentService{
	@Autowired
	private StudentDao studentDao;

	@Override
	public Student getStubyID(Integer stu_id) {
		// TODO Auto-generated method stub
		return this.studentDao.getStubyID(stu_id);
	}

	@Override
	public Student getStuInfo(Integer stu_id) {
		// TODO Auto-generated method stub
		return this.studentDao.getStuInfo(stu_id);
	}

	@Override
	public Integer updateStu(Student student) {
		// TODO Auto-generated method stub
		return this.studentDao.updateStu(student);
	}

	@Override
	public List getStuList() {
		List list = this.studentDao.getstulist();
		return list;
	}

	@Override
	public int delStu(String stuname) {
		return studentDao.delStu(stuname);
	}

	@Override
	public Student getStuById(Integer student_id) {
		Student stu = this.studentDao.getstuById(student_id);
		return stu;
	}

	@Override
	public int updateStudent(Student student) {
		return this.studentDao.updateStudent(student);
	}

	@Override
	public List<Student> getStubyName(String name) {
		// TODO Auto-generated method stub
		return this.studentDao.getStubyName(name);
	}

}
